/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86186
 * Date: 2023-10-01
 * Time: 21:19
 */
public class Demo2 {
    private static int num;
    public static void main(String[] args) {
        synchronized (Demo2.class) {
            for(int i = 0; i < 10; i++) {
                num += i;
            }
            System.out.println(num);
        }
    }
}
